The present invention relates to the field of telecommunications on a shared transmission medium. The invention relates more particularly to a method for access to the shared transmission medium used by an electronic device sharing the transmission medium in order to send messages.
When a plurality of electronic devices must share the same transmission medium (hereinafter “the medium”), a technique for organising the sharing of said medium between the various electronic devices must be established. Historically, when the medium to be shared was a radio-frequency band, a technique known as “carrier sense multiple access” was developed. The principle of such a method for access to the medium is that an electronic device wishing to send a message over a shared medium will commence by checking that the medium is available before sending the message. The access method has been improved over the years, in particular in order to best adapt to the medium used. The medium used may be an electrical network, and a so-called “powerline communication” (PLC) is then spoken of. Thus technical specifications, including such a method for access to a shared medium, have been produced. The technical specification “PoweRline Intelligent Metering Evolution” (PRIME) developed by the “PRIME Alliance Technical Working Group”, for example in version 1.4 thereof published in October 2014, which is incorporated herein by reference in its entirety, comprises a description of the method for access to a shared medium by electronic devices such as communicating energy meters. The method for access to a medium, more particularly to one of the channels defined in the technical specifications, is defined in Chapter 4.3.3 (“Channel access”) of the technical specifications. FIG. 32 of the PRIME v1.4 technical specifications (“Flow chart for CSMA-CA algorithm”) illustrates said method for access to the medium, the medium here being a PLC transmission channel. This method is set out in FIG. 1, and illustrates a method 100 for access to a shared medium executed by an electronic device in accordance with the PRIME v1.4 technical specifications. A concise description of the method is given below, the details can advantageously be found in the PRIME v1.4 technical specifications published in October 2014, in particular Chapter 4.3.3, pages 77 to 83.
The method 100 comprises a first step 101 of receiving a request to send a message (a request referred to as “CSMA-CA Req”) on the shared medium, here a PLC channel. Parameters (“txAttemps”, “chSenseCount” and “burstLen” for example) are initialised to default values (for example here “zero” for the three parameters) in a step 102. In a step 103, the value of a parameter “macSCPChSenseCount” is fixed at “priority +1”, the parameter “priority” enabling the electronic device executing the method to prioritise the messages to be sent. In a step 104, the electronic device executing the method 100 determines a waiting time (parameter “macSCPRBO”, also referred to as “backoff time”), also referred to as “random backoff time, RBO”, used for an attempt to send the message over the medium. The value of the backoff time, that is to say of the parameter “macSCPRBO”, is determined in accordance with the following formula:
  macSCPRBO  =      random    ⁢                  ⁢                         (                  0          ,                      min            (                                          (                                                      2                                          (                                              priority                        +                        txAttemps                        +                                                  macCSMAR                          ⁢                                                                                                          ⁢                          1                                                                    )                                                        +                                      macCSMAR                    ⁢                                                                                  ⁢                    2                                                  )                            ,                              (                                  macSCPLength                  2                                )                                      )                              
With “random(A, B)”, a mathematical function determining a random value and lying between the values of the arguments A and B of the function random,
“min(A, B)”, a mathematical function determining the minimum value between the values of the arguments A and B of the function min,
“priority”, “txAttemps” the previously described parameters,
“macCSMAR1” and “macCSMAR2” two predetermined parameters, the values of which are fixed by the PRIME technical specifications (“macCSMAR1=3” and “macCSMAR2=1”, cf. Table 97 on page 239 of the PRIME v1.4 technical specifications), and
“macSCPLength” a parameter representing the duration of a contention period (“Shared Contention Period—SCP”) used by the method for sending a message in accordance with the PRIME technical specifications.
Thus the backoff time “macSCPRBO” is determined randomly and lies between a minimum backoff time and a maximum backoff time. According to the previously described formula, the minimum backoff time is “zero”. Likewise, the maximum backoff time, referred to as “Tmax”, is equal to:
  Tmax  =      min    ⁢                         (                              (                                          2                                  (                                      priority                    +                    txAttemps                    +                                          macCSMAR                      ⁢                                                                                          ⁢                      1                                                        )                                            +                              macCSMAR                ⁢                                                                  ⁢                2                                      )                    ,                      (                          macSCPLength              2                        )                              
In a following step 105, and before commencing a backoff time, the electronic device executing the method must check that the remaining time for the contention period in question is sufficient to accommodate the backoff time, the number of channel sensing phase iterations and the time for any transmission of the message (“Tx time”). If the time remaining for the contention period is insufficient, the backoff time must be cancelled and recommence during the next contention period. Thus, in step 105, the electronic device checks that (macSCPRBO+“iteration time”+Tx time) is less than or equal to the remaining contention period time (SCP).
If this is not the case, in a step 106, the electronic device awaits the following contention period in order to recommence the process at step 104, a new backoff time value “macSCPRBO” then being generated.
If such is the case, that is to say there remains sufficient time in the contention period to accommodate the backoff time, the channel sensing phase iterations and the time for transmitting a message (“Tx time”), in a step 107, then the electronic device waits for the backoff time (“macSCPRBO”) determined during step 104. This backoff time is expressed as a number of symbol times (“duration symbol”) used on the transmission channel, a symbol time being typically equal to “2.24 ms”.
Once the backoff time has elapsed, the electronic device, in a step 108, performs a channel sensing phase in order to determine whether the transmission channel is available (idle) or busy. The medium is busy typically since another message is being sent by another electronic device sharing the medium.
In other words, the electronic device waits for a backoff time “macSCPRBO”, during a step 107, in order to check, in a step 108, whether the medium is available for sending the message.
In a step 109, according to the state of the medium determined at step 108, the electronic device passes to a step 110 if the medium is available or to a step 121 if the medium is busy.
In the case where the channel is available, the electronic device, in step 110, checks the value of the parameter “chSenseCount”. If this parameter is equal to the value of a predetermined parameter “macSCPChSenseCount”, then the electronic device, in a step 130, sends the message over the transmission medium. Possibly, the value of “macSCPChSenseCount” is defined as being equal to “priority +1”.
In the case where “chSenseCount” is less than “macSCPChSenseCount”, then the electronic device, in a step 111, increments the value of the parameter “chSenseCount”. The value is typically incremented by “1”. Following this incrementation, in a step 112, the electronic device waits for a period “macCSMADelay”, a period typically equal to “3 ms”. The electronic device then once again executes step 108 in order to determine the state of the channel, and possibly recommences the cycle of steps 108 to 112 as long as the medium is available, in order ultimately to end with the sending of the message during step 130.
If, during a step 109, the electronic device finds that the state of the medium determined during step 108 is “busy”, then the electronic device passes to a step 121. In step 121, the electronic device compares the value of the parameter “txAttemps” with the value of a parameter “macSCPMaxTxAttemps”. In the case where the value of “txAttemps” is equal to the value of “macSCPMaxTxAttemps”, then, in a step 140, the electronic device declares failure of the sending of the message. Possibly, an error message is sent to another electronic device or an entry is updated in a log file. In the case where the value of “txAttemps” is less than the value of “macSCPMaxTxAttemps”, then the electronic device, in a step 122, increments the value of “txAttemps”. The incrementation is typically by “1”. Next, the electronic device resets the value of the parameter “chSenseCount” to zero. Then the electronic device, in a step 124, determines the value of “burstLen” by fixing it equal to the length of a current message (“burst length”) sent over the medium and detected during step 108. This information is supplied by a physical layer of the electronic device. In a step 125, the electronic device next waits for the period “burstLen” previously defined, that is to say until the end of the sending of the current message. The electronic device then resumes the method 100 at step 104, determining a new backoff time value “macSCPRBO” in order to recommence a cycle.
The method ends after a step 130 or a step 140, that is to say either after a sending of the message over the medium or a finding that the sending has failed.
This method, implemented in the PRIME v1.4 technical specifications, but also in other technical specifications, thus allows sharing of the medium between a plurality of electronic devices sharing this medium equitably. However, it has a few drawbacks.
First of all, by its nature, the transmission of a message over a channel of the PLC type is unreliable. That is to say, for any reason, such as interference on an electrical line, a message is frequently lost and must be resent. The resending time means that in the end the transmission of the information included in the messages is done with a certain latency. In a PLC network, this latency time may be detrimental for certain applications, such as for example the collection of metering data or the setting of the time of a communicating energy meter. It would be desirable to be able to benefit from better latency in certain cases. Likewise, the method described above is not necessarily optimum in the cases where few messages are sent over the medium. More generally, it will be desirable to be able to reduce the latency, highly dependent on the backoff time “macSCPRBO”, in certain cases.
It is consequently desirable to overcome these drawbacks of the prior art.